To get the geographic position of a user in HTML5, we use geolocation API. Geo-location in HTML5 is used to share the location of the user with some website.
The HTML5 geolocation API has only one object – the navigator.geolocation object and exposes 3 methods getCurrentPosition(), watchPosition(), and clearWatch().
The HTML Geolocation API is used to get the geographical position of a user. Since this can compromise privacy, the position is not available unless the user ... Drag and Drop · HTML Geolocation · Try it Yourself
HTML5 geolocation detects latitude and longitude coordinates by using the device's GPS (if available on the device) or the device's mobile/WIFI signal (if GPS ...